//
//  STSerChemicalCell.m
//  YiYueHairdresser
//
//  Created by zhouzhouzhou on 2018/10/8.
//  Copyright © 2018年 YuYiLian. All rights reserved.
//

#import "STSerChemicalCell.h"

@implementation STSerChemicalCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    self = [[[NSBundle mainBundle] loadNibNamed:@"STSerChemicalCell" owner:nil options:nil] lastObject];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    return self;
}

-(void)setChemicalsCellWithData:(id)data cellData:(id)cellData{
    STServiceOptionModel * model = data;
    STServiceOOModel * cellModel = cellData;
    UILabel * nameLab1 = (UILabel *)[self viewWithTag:11011];
    UILabel * nameLab2 = (UILabel *)[self viewWithTag:11013];

    nameLab1.text = [NSString stringWithFormat:@"%@:",model.optionname];
    nameLab2.text= @"价格:";
    if(cellModel.price){
        self.txtPrice.text = [NSString stringWithFormat:@"%0.2f",cellModel.price];
    }else{
        self.txtPrice.text = @"";
    }
    
    self.txtName.text = cellModel.optionvalue;
    
}

- (IBAction)actionDel:(id)sender {
    if(self.delChemicalBtn) {
        self.delChemicalBtn(sender);
    }
}

@end
